// Method POST: dùng để thực hiện insert
couchdb = function(){
	this.url = "http://192.168.39.110:2000";
	
	this.addDatabase = function(dbname){
		$.ajax({
	        type: 'POST',
	        contentType: 'application/json',
	        url: this.url + "/" + dbname,
	        dataType: "json",
	        data: {},
	        success: function(data, textStatus, jqXHR){
	            alert(data);
	        },
	        error: function(jqXHR, textStatus, errorThrown){
	            alert('Error: ' + textStatus);
	        }
	    });
	} 	
	
	this.getAllDB = function()
	{
	    $.ajax({
	        type: 'GET',
	        url: '/product/getAll',
	        dataType: "json", // data type of response
	        success: renderList
	    });
	}
} 

